#这里是测试入口
import localTime
import test_login
import test_yeqian
import test_plan_day
import test_plan_week
import test_plan_month
import test_plan_xueqi
import test_affair_week
import test_affair_monthly
import test_affair_term
import test_timeInfo
import test_timeInfo_brust
import test_topic
from selenium import webdriver
class Main():
    def __init__(self):
        print(localTime.getTime()+'>>>浏览器启动中...')
         # 加启动配置，不加这个会被谷歌拦截(*｀皿´*)ﾉ 
        option = webdriver.ChromeOptions()
        option.add_argument('disable-infobars')
        # 打开chrome浏览器
        self.driver = webdriver.Chrome(chrome_options=option)
        #20秒等待时间
        self.driver.implicitly_wait(10)
        print(localTime.getTime()+'>>>响应等待时间设置为10s')
        import time
        time.sleep(3)
    #要测试的模块都往这里放
    def test(self):
        print('===========登录============')
        #调用test_login.py的runTest()函数，登录测试，以下同理
        test_login.runTest(self.driver)
        test_login.runTest2(self.driver)
        #页签测试
        test_yeqian.runTest(self.driver)

        print('========计划目标管理=========')
        #计划目标管理日计划测试
        #test_plan_day.runTest(self.driver)
        test_plan_day.runTest2(self.driver)
        test_plan_day.runTest3(self.driver)
        test_plan_day.runTest4(self.driver)
        #计划目标管理周计划测试
        #test_plan_week.runTest(self.driver)
        test_plan_week.runTest2(self.driver)
        test_plan_week.runTest3(self.driver)
        test_plan_week.runTest4(self.driver)
        #计划目标管理月计划测试
        #test_plan_month.runTest(self.driver)
        test_plan_month.runTest2(self.driver)
        test_plan_month.runTest3(self.driver)
        test_plan_month.runTest4(self.driver)
        #计划目标管理学期计划测试
        #test_plan_xueqi.runTest(self.driver)
        test_plan_xueqi.runTest2(self.driver)
        test_plan_xueqi.runTest3(self.driver)
        test_plan_xueqi.runTest4(self.driver)

        print('========常规事务管理=========')
        #常规事务管理周事务
        #test_affair_week.runTest(self.driver)
        test_affair_week.runTest2(self.driver)
        test_affair_week.runTest3(self.driver)
        test_affair_week.runTest4(self.driver)
        #常规事务管理月事务
        #test_affair_monthly.runTest(self.driver)
        test_affair_monthly.runTest2(self.driver)
        test_affair_monthly.runTest3(self.driver)
        test_affair_monthly.runTest4(self.driver)
        #常规事务管理学期事务
        #test_affair_term.runTest(self.driver)
        test_affair_term.runTest2(self.driver)
        test_affair_term.runTest3(self.driver)
        test_affair_term.runTest4(self.driver)

        print('========时间信息管理=========')
        #时间信息管理
        test_timeInfo.runTest(self.driver)
        test_timeInfo.runTest3(self.driver)
        test_timeInfo.runTest4(self.driver)
        test_timeInfo_brust.runTest(self.driver)
        #test_timeInfo_brust.runTest3(self.driver)
        #test_timeInfo_brust.runTest4(self.driver)

        print('========话题社区=========')
        test_topic.runTest(self.driver)
        test_topic.runTest2(self.driver)
        
        print(localTime.getTime()+'>>>RUN FINSH!!<<<')

#直接运行这个py
if __name__ == "__main__":
    main=Main()
    main.test() 
